package com.clock.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel("评论")
public class Comment {

    @ApiModelProperty("评论id ")
    private Long commentId;
            
    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("0-用户;1-帖子;2-评论")
    private Integer entityType;
            
    @ApiModelProperty("实体id")
    private Long entityId;
            
    @ApiModelProperty("评论目标用户id")
    private Long targetId;
            
    @ApiModelProperty("评论内容")
    private String content;
            
    @ApiModelProperty("0-正常;1-精华;2-拉黑")
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("评论创建时间")
    private Date createTime;
}

